package com.wy.powerbuilder.config.qmj;

        import com.wy.powerbuilder.config.ld.ShiroConfig;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.web.servlet.HandlerInterceptor;
        import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
        import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
        import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class CostsConfig implements WebMvcConfigurer {

    @Autowired
    HandlerInterceptor interceptor;
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");

    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //super.addInterceptors(registry);
        //静态资源；  *.css , *.js
        //SpringBoot已经做好了静态资源映射
                registry.addInterceptor(interceptor)
                        .excludePathPatterns("/static/**","/static/js/**");
    }
}



